infinit range loop c#

42

infinit range loop c# -

public IEnumerable<int> InfiniteCounter()
{
    int counter = 0;
    while (true)
    {
        unchecked
        {
            yield return counter;
            counter++;
        }
    }
}

Comments

Submit
0 Comments